Creating and editing HTML documents

Now that you have a site set up, you can begin to create the documents (pages) that constitute the site. (If you haven't set up a site yet, see Creating a local site.)

You can create new, blank HTML documents in Dreamweaver, or you can open an existing HTML document, regardless of how it was created. You can also create a new document based on a template.

Note: When you save your documents, avoid using spaces and special characters in file and folder names whenever possible.

To create a blank HTML document in a new Document window:

Choose File > New from an existing Document window (Windows) or from the main menu bar (Macintosh).

If you open the HTML Source inspector (choose Window > HTML Source), you can see that the new document isn't really completely blank—it contains HTML, HEAD, and BODY tags to get you started. As you type in the Document window or insert objects such as tables and images, you can leave the HTML Source inspector open and watch as the HTML source code is created. For more information on the HTML Source inspector, see HTML Source inspector.

Note: Do not use special characters (such as é, ç, or ¥) or punctuation (such as colons, slashes, or periods) in the names of files you intend to put on a remote server. Many servers change these characters during upload, which will cause any links to the files to break.

To open an existing HTML file, do one of the following:

Choose File > Open.
If the file was created using Microsoft Word, choose File > Import > Import Word HTML.
Dreamweaver opens the file and then removes extraneous or unnecessary HTML code generated by Word. (Microsoft Word 97 and later versions provide a Save as HTML feature, which adds extra HTML code as it converts a document to HTML.) For more information, see Cleaning up Microsoft Word HTML.
Note: You can't directly import a Microsoft Word (.doc) file into Dreamweaver. If you want to import the contents of a Word file, launch Word and save the file as HTML before importing it into Dreamweaver.

To create a new document based on a template:

1 Choose File > New From Template.
A dialog box appears, listing the templates available for the current site. (You must create templates before you can create documents based on them; see Creating templates.)
When you create a document based on a template, some parts of the document are locked so that they can't be changed. (The template file determines which regions are editable and which are not.) This ensures consistency when you use a template for multiple documents in a site.
2 Select a template and click Select.
To modify the editable parts of the template, select the placeholder content and type over it. The noneditable parts of the template are identified by a highlight color. To customize the highlight color, see Template preferences.

To learn more about designing and working with templates, see Templates and libraries overview.